fix: repair cross-package bugs so all tests and tsc pass - #96
Open
stooit wants to merge 1 commit into
Open
Conversation
- rename useDebounce -> useSearchDebounce and update apps/web importer - forward aria-label/rest props on icon-only Button (WCAG 4.1.2) - fix formatDate to en-AU day-first with no leading-zero day - fix DataTable stale-closure controlled re-render bug - add bun types to tsconfig so tsc --noEmit passes on test files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes all failing tests and type errors in the monorepo. All bugs spanned multiple packages. No test files were modified and no dependencies were added.
Verification:
bun test packages/utils/test packages/ui/test apps/web/test --preload ./packages/ui/test/setup.ts→ 13 pass / 0 fail, andtsc --noEmit→ 0 errors.Fixes
useDebouncewas renamed touseSearchDebounceinpackages/utils(barrel export +git mvof the hook file), and the stale importer inapps/web/src/lib/api.tswas updated to match. Theapi.test.tsexpectation ofuseSearchDebounceis the source of truth.Buttonnow forwardsaria-label(and other rest props) to the underlying<button>, satisfying WCAG 4.1.2 (Button.test.tsx).formatDatenow renders day-first with no leading zero on the day (e.g.1/03/2024) while keeping month two-digit, satisfying all assertions indate.test.ts.tsc --noEmitno longer errors onimport ... from "bun:test"in the test files (required for a clean type check).Assumptions
--preload ./packages/ui/test/setup.tsDOM setup (per the roottestscript) is the intended way to run the suite.tsc --noEmitclean on the pre-existingbun:testimport errors.